package collection;

public class pos {
	public static void main(String[] args){
		int a[]={11,5,6,7,8,4};
		int a2[]=new int[10];
		
		a2=fun(a,10,1);
		for (int i = 0; i < a2.length; i++) {
			System.out.println(a2[i]+ " ");
			
		}
		
	}

	public static int[] fun(int a[],int num, int pos){
		int a1[]=new int[a.length+1];
		for (int i = 0; i < a1.length; i++) {
			if(i>=pos){
				if(i==pos){
					a1[i]=num;}
				
				else{
					a1[i]=a[i-1];
					}
			}
				else
					a1[i]=a[i];
				
				
			}
			
				
		return a1;
			}
			
		
}
